﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Finance_MonthReport : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int year = string.IsNullOrEmpty(Request.QueryString["year"]) ?
                DateTime.Now.Year : int.Parse(Request.QueryString["year"]);
            this.lblYear.Text = year.ToString();
            int month = string.IsNullOrEmpty(Request.QueryString["month"]) ?
                DateTime.Now.Month : int.Parse(Request.QueryString["month"]);
            this.lblMonth.Text = month.ToString();
            this.rptMonthReport.DataSource = Active.Core.FinanceManager.GetMonthReport(year, month);
            this.rptMonthReport.DataBind();
        }
    }
}
